<template>
  <view style="height: 100%">
    <web-view :src="url"></web-view>
  </view>
</template>

<script lang="ts" setup>
  import { verifyUrl } from '@/mxp-ui/mxp-tool/utils/verify';
  import { onLoad } from '@dcloudio/uni-app';
  import { ref } from 'vue';
  const url = ref('');
  onLoad((options?: { url?: string }) => {
    const _url = decodeURIComponent(options && 'url' in options ? String(options.url) : '');
    url.value = verifyUrl(_url || '') ? _url : '';
  });
</script>
